package org.penguin.study.bk.annotation

import org.penguin.study.bk.validator.PasswordValidator
import java.lang.annotation.ElementType.FIELD
import java.lang.annotation.RetentionPolicy.RUNTIME

import java.lang.annotation.Documented
import java.lang.annotation.Retention
import java.lang.annotation.Target

import javax.validation.Constraint
import javax.validation.Payload;
import kotlin.reflect.KClass


@Target(FIELD)
@Retention(RUNTIME)
@Constraint(validatedBy = [PasswordValidator::class])
@Documented
annotation class Password(val message: String = "Invalid password", val groups: Array<KClass<*>> = [], val payload: Array<KClass<out Payload>> = [])